<html>
<head>
    <meta http-equiv="Content-Type " charset="utf-8"/>
    <title>无标题文档</title>
    <style>
        #div1 {
            border: 2px solid red;
            height: 100px;
            overflow: auto;
            width: 40px;
        }
    </style>
</head>

<body>
</body>
<script type="text/javascript">
    if (window.Notification && Notification.permission !== "denied") {
        Notification.requestPermission(function (status) {
            console.info('支持notification', status)

            setTimeout(function () {
                var n = new Notification('通知标题1', {
                    body: '这里是通知内容！'
                });

                n.onclick = function () {
                    window.open('http://www.baidu.com')
                }
            }, 2000)

        });
    }
</script>

</html>